package cn.juochiu.spring.project.rabbit.object;

import cn.juochiu.spring.project.model.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "object")
public class ObjectReceiver {

    private static final Logger log = LoggerFactory.getLogger(ObjectReceiver.class);

    @RabbitHandler
    public void process(User user) {
        log.info("object 消费 :{}",user);
    }

}
